#pragma once
#include "control.h"


// CPanelControl dialog

class CPanelControl : public CDialog
{
	DECLARE_DYNAMIC(CPanelControl)

public:
	CPanelControl(CWnd* pParent = NULL);   // standard constructor
	virtual ~CPanelControl();

	data_xml*		m_dummyXmlData;
	
	int m_iGridMode;

// Dialog Data
	enum { IDD = IDD_PANELCONTROL };
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	Bitmap* m_backbuffer;
	Graphics* m_backbufferGraphics;	
	void RenderGrid(Graphics & aGraphics);
	void RenderRuler(Graphics & aGraphics);

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnPaint();
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnKillFocus(CWnd* pNewWnd);
	afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
	virtual BOOL PreTranslateMessage(MSG* pMsg);
};
